<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <button v-on:click="show=true">打开</button>
        <div class="mask" v-show="show">
            <span @mouseup="show=false">×</span>
            <p>我是弹窗</p>
        </div>
        <ul>
            <li v-for="(item,index) in list" @click="activeIndex=index" v-bind:style="{color:activeIndex==index?'red':''}">
                {{item.title}}</li>
        </ul>
        <div>
            <p v-for="item in list[activeIndex].child">{{item}}</p>
        </div>
    </div>
    
</body>
<script src="./vue.js"></script>
<script>
    const namel = '李四'
    const vue = new Vue({
        el: "#app",
        data: {
            ele: "你好世界",
            show: false,
            activeIndex: 0,
            list: [{
                title: '标题1',
                child: ['杨旭', '情书', '', '王荣喜']
            }, {
                title: '标题2',
                child: ['账号借钱', '张浩杰', '', '一个亿']
            }, {
                title: '标题3',
                child: ['双十一', '依旧', '一个人', '剁手']
            }, ]
        }
    })
</script>

</html>